public without sharing class OwnerRightSaveAccount{

    public static String saveAccount(List<Account> accList, String s ,String d){
       
       Map<String ,String> msg = new Map<String ,String>();
        try {
            // 新建一个审批的抬头
            Account_Owner_Change__c aoc = new Account_Owner_Change__c();
            aoc.SubCompanyManager__c = s;
            aoc.DepartmentManager__c = d;
            aoc.Status__c = '草案中';
            insert aoc;

            for (Account acc : accList) {
                acc.OwnerChangeProc__c = aoc.Id;
            }
            update accList;
            return aoc.Id;
        } catch (Exception e) {
            return e.getMessage();
        }
       
    }
}